Skip to content

Added pod data to endpoint query to know out which Pods are related#411

Open
willianbriotto wants to merge 2 commits intorunpod:mainfrom
willianbriotto:endpoints_pods
Open

Added pod data to endpoint query to know out which Pods are related#411
willianbriotto wants to merge 2 commits intorunpod:mainfrom
willianbriotto:endpoints_pods

Conversation

@willianbriotto
Copy link
Copy Markdown

This commit adds pod data to the endpoint query to find out which pods are related to the endpoint. Today, only data from the created endpoint itself is returned, but it is not possible, for example, to know the pods' URL to make a request directly to it, since the URL has the format:

https://pod_id-port_number.proxy.runpod.net/

With this data, it will be possible after the endpoint is created to get more data from the pod by calling get_pod(pod_id: str)

@willianbriotto willianbriotto changed the title Added pod data to endpoint query to know out …which Pods are related Added pod data to endpoint query to know out which Pods are related Apr 21, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the GraphQL endpoint listing query to include pod information, enabling callers to discover which pods back a given endpoint (and retrieve pod IDs/port data for direct proxy access patterns).

Changes:

  • Added a pods selection set to the QUERY_ENDPOINT GraphQL query.
  • Included pod attributes (id, podType, ports, desiredStatus) in the endpoint response payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +33 to +38
pods {
id
podType
ports
desiredStatus
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding pods to the default QUERY_ENDPOINT means every get_endpoints() call will now fetch per-endpoint pod lists (and their ports/status), which can significantly increase response size and latency for users with many endpoints/pods. Consider keeping QUERY_ENDPOINT as a lightweight list query and introducing a separate/opt-in query (or a second constant like QUERY_ENDPOINT_WITH_PODS) for callers that actually need pod details.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants